<template>
    <div class="home">
        <van-nav-bar title="保单" @click-right="onClickRight">
            <!-- <van-icon name="search" slot="right" /> -->
        </van-nav-bar>
        <van-search v-model="value" :show-action="showAction" placeholder="请输入搜索关键词" @search="onSearch" @cancel="onCancel"
            @focus="onFocus" />
        <van-tabs type="card" v-model="active" color="#1989fa" style="margin-top:16px">
            <van-tab title="收支明细">
                
            </van-tab>
            <van-tab title="收入明细">
                
            </van-tab>
            <van-tab title="支出明细">

            </van-tab>
        </van-tabs>
    </div>
</template>
  
<script>
export default {
    name: 'home',
    data() {
        return {
            active: 0,
            value: '',
            showAction: false,
            show: false,
            showDel: false,
            result: ['a', 'b'],
            showShare: false,
            options: [
                { name: '微信', icon: 'wechat' },
                { name: '二维码', icon: 'qrcode' },
            ],
            arr: [
                {
                    adresss: '安徽省 马鞍山市 - 福建省 泉州市',
                    id: 'PYDL20232102Q000H38',
                    date: '2023-09-09 13:00:00',
                    oddNumbers: 'MAGU22276,TEMU9848',
                    cost: '84',
                    name: '大米'
                },
                {
                    adresss: '安徽省 马鞍山市 - 福建省 泉州市',
                    id: 'PYDL20232102Q000H37',
                    date: '2023-09-09 13:00:00',
                    oddNumbers: 'MAGU22276,TEMU9848',
                    cost: '84',
                    name: '大米'
                },
                {
                    adresss: '安徽省 马鞍山市 - 福建省 泉州市',
                    id: 'PYDL20232102Q000H36',
                    date: '2023-09-09 13:00:00',
                    oddNumbers: 'MAGU22276,TEMU9848',
                    cost: '84',
                    name: '大米'
                }
            ]
        };
    },
    methods: {
        onClickRight() {
            this.$toast('按钮');
        },
        onSearch() {
            this.$toast(this.value);
        },
        onFocus() {
            this.showAction = true;
        },
        onCancel() {
            this.showAction = false;
        },
        splitOrderClick() {
            this.show = "true"
        },
        changeOrderClick() {
            this.$router.push('/changeOrder')
        },
        onSelect(option) {
            this.$toast(option.name);
            this.showShare = false;
        },
        shareClick() {
            this.showShare = true;
        },
        reportCaseClick() {
            this.$router.push('/reportCase')
        },
        delClick() {
            this.showDel = true
        }
    }
}
</script>
<style scoped>
.home {
    background-color: #f5f5f5
}

.title {
    margin: 1em;
    font-size: 1.5em;
}
.van-submit-bar {
    bottom: 16rem !important
}
</style>